package com.code.day13;

import java.util.Arrays;

public class Day13StringSplit {
    public static void main(String[] args) {
        String s ="a,java,python";
        String[] arr = s.split(",");
        System.out.println(Arrays.toString(arr));

        for(String element : arr){
            System.out.println( element);
        }


        String s1 = "java.txt";
        String[] split = s1.split("\\."); // \本身是转义字符 所以要用\\.同时给.和\进行转义
        for(String el :split){
            System.out.println(el);
        }

    }
}
